/****************************mainwindow.h*********************************/
/*****************************************************************************/
/*******************Browsers Daily Build Updater************************/
/************Copyright (C) 2010-2011  Gianluigi Biancucci*************/
/*****************************************************************************/
/*****This is free software, and you are welcome to redistribute it****/
/*****and / or modify underthe terms of GPLV2 License.**************/
/*****This program comes with ABSOLUTELY NO WARRANTY*****/
/*****************************************************************************/

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "singletondownloader.h"
#include <QFile>
#include <QMessageBox>
#include <QProcess>
#include"IBrowserUpdater.h"
#include "setfilehandler.h"
namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void downNUpd();
    QString getInstallPath();
public slots:
    void on_checkButton_clicked();
    void on_radio64_clicked();
    void on_radio32_clicked();
    void on_firefoxradio_clicked();
    void on_operaradio_clicked();
    void on_chromiumradio_clicked();
    void about();
    void help();
    void proxy();
    void settings();
private:
    void refreshPathLabel();
    QString getChromiumPath();
    QString getFirefoxPath();
    QString getOperaPath();
    void setOperaPathLabel();
    void setChromiumPathLabel();
    void setFirefoxPathLabel();
    void setupFactory();

    QString currPath;
    QString currArch;
    QString currUpdater;
    Ui::MainWindow *ui;
    IBrowserUpdater* updater;
    QProcess * process;
    SetFileHandler* setFileH;

};

#endif // MAINWINDOW_H
